/**
    Copyright (c) 2009 yakiimo02
    Distributed under the New BSD License.
    See included license.txt or http://www.yakiimo3d.com/NewBSDLicense.txt
**/

#pragma once

#include "DXUTgui.h"    // CDXUTDialogResourceManager
#include "SDKmisc.h"    // CDXUTTextHelper

/**
    @brief  GUI
    @author yakiimo02
    @date    09/12/19
*/
class GUI
{
public:
    GUI();

    void    RegistGuiItems();
    HRESULT Create( ID3D11Device* pd3dDevice );
    void    FrameRender( float fElapsedTime );
    HRESULT ResizedSwapChain( ID3D11Device* pd3dDevice, const DXGI_SURFACE_DESC* pBackBufferSurfaceDesc );
    void    Destroy();

    LRESULT MsgProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool* pbNoFurtherProcessing );

protected:
    void RenderText();

protected:
    CDXUTDialogResourceManager  m_DialogResourceManager;    // Manager for shared resources of dialogs
    CDXUTTextHelper*            m_pTxtHelper;                // For drawing text
    CDXUTDialog                 m_SampleUI;                 // Dialog for sample specific controls
    CDXUTComboBox*              m_pSortModeCB;                // Sort mode combobox
    CDXUTComboBox*              m_pSortDirCB;                // Sort dir combobox
    CDXUTCheckBox*                m_pResetDataCheckBox;        // Whether to reset data before sorting
    CDXUTButton*                m_pSortButton;                // Push button to begin sorting
};